package com.leo.mqttclientdemo.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Administrator
 */
@RestController
@RequestMapping
public class MqttWebHookController {

    @RequestMapping("webhook")
    public void getMqttMsg(@RequestBody Map<String, Object> param) {
        System.out.println("进入webhook");
        //客户端发布主题
        System.out.println("webhook 接受到的消息：" + param.get("payload"));

    }

}
